home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d17 / prin28.arc / PRIN28.DOC < prev    next >
Text File  |  1990-07-29  |  11KB  |  277 lines

  1.                                    PRIN
  2.                                 Version 2.8
  3.                       Copyright (C) Drake Koefoed 1990
  4.  
  5.  
  6.  
  7. By use of this program, you agree to hold the author free from any
  8. liability of any kind.
  9.  
  10.  
  11.  
  12. HOW TO USE PRIN
  13. ===============
  14.  
  15. PRIN is called up by the command
  16.  
  17.         PRIN filename [options]
  18.  
  19. where (filename) is the name of a file.  PRIN will print the contents
  20. of the file named, at 60 lines per page (unless you specify another
  21. page size with the /l parameter, explained below)  Unless you use the
  22. /n parameter (explained below), PRIN will print the filename in all caps
  23. at the top of the first page.
  24.  
  25. You may abort what's printing at any time by pressing escape.  PRIN
  26. will discontinue printing the file, but bear in mind that there are
  27. two factors to consider:
  28.  
  29. *  Your printer may have a substantial buffer, which is usually full
  30.    because PRIN runs much faster than a printer.  The printer will
  31.    continue to print what's in that buffer, even after PRIN has been
  32.    aborted, though PRIN will return to the DOS prompt.
  33.  
  34. *  PRIN checks for an escape before sending each line;  DOS suspends
  35.    PRIN while the printer empties enough of its buffer to accept
  36.    another line; only when PRIN has control back will it abort the
  37.    printing.
  38.  
  39. While we're speaking of aborts, it helps to turn the printer on before
  40. you start printing, but you don't have to.  If it's off, you will get
  41. the nasty message from DOS: "Error writing device PRN.  Abort, Retry,
  42. Fail, Ignore?". Just turn the printer on and hit r.  It will print as
  43. if nothing had happened.  I do this a lot because I turn my printers
  44. off when something goes wrong, and when you're testing a printing
  45. program, that is not uncommon.
  46.  
  47. In answer to the obvious(?) question, no, I can't test if PRN is on. I
  48. could test to see if LPT 1 was on, but you can use the MODE command to
  49. redirect PRN to another port, in which I would be testing the wrong
  50. device.  If this doesn't make any sense to you, don't worry, you don't
  51. need to know it.
  52.  
  53. PRIN filters out all form-feeds  embedded in the file, so it totally
  54. ignores the existing pagination of the file.  This is handy when
  55. printing out shareware documents that have wierd page lengths, useless
  56. formfeeds, or no pagination at all.
  57.  
  58. PRIN sends an Escape-@  to the printer on startup, (unless you use the
  59. i option, explained below), which is a RESET to an Epson and many
  60. others.   Some printers, however, may not understand this code, in
  61. which case they will not reset.
  62.  
  63. PRIN depends on you to set the paper to the TOP OF FORM before
  64. starting.  60 (or whatever is set by the /l parameter) lines will be
  65. printed, and then a formfeed.   When the end of file is reached,
  66. another formfeed will be sent to eject the last page, and PRIN will
  67. exit.
  68.  
  69. COMMAND LINE OPTIONS
  70. ====================
  71. All switches are lowercase; uppercase are being reserved for future
  72. options, for instance, P will be filename on each page as well as a
  73. number, and M will be force a margin even if I have to wrap to do it.
  74.  
  75. Spaces or forward slashes will have the same effect.  Programmers refer
  76. to these things as delimiters, because they mark the limits of the
  77. filename and the command line parameters.  If you use some that are not
  78. needed, you will get a period on the screen as each is found.  Your
  79. printout is not affected.  This is just to tell you you don't need to
  80. type so much.
  81.  
  82. NO FILENAME AT TOP OF FIRST PAGE: n
  83. -----------------------------------
  84. The n option prevents the filename from being printed.  You can say
  85.  
  86.         PRIN myfile/n
  87. or
  88.         PRIN myfile n
  89.  
  90. Either will stop the filename from being printed.
  91.  
  92. OMIT DATE AND TIME FROM FILENAME: o
  93. -----------------------------------
  94. The o option prevents the date and time of the file from being printed.
  95. If the filename is not printed, then the date and time are automatically
  96. left off.
  97.  
  98.  
  99. LINES PER PAGE: l
  100. -----------------
  101. The l option sets the number of lines to the number following.
  102. For example:
  103.  
  104.         PRIN filename l55
  105.  
  106. would cause PRIN to print out the file called filename at 55 lines per
  107. page. This number must be two digits.  ( use 05 for 5 lines per page.)
  108.  
  109. PAGE NUMBERING: p
  110. -----------------
  111. The p option numbers the pages in the upper right.
  112.  
  113. MARGIN AT LEFT: m
  114. -----------------
  115. The m option adds a left margin of five characters
  116. unless the line is too long.  I add a margin to any line that will fit
  117. on the page with one.  If it won't I print that line without a margin.
  118. Using the default linelength, you will get margins if your lines are
  119. not over 75 characters.  This feature keeps your printout away from
  120. the area that hole punches punch in.
  121.  
  122. RIGHT MARGIN: rxx or rxxx
  123. -------------------------
  124. (where xx or xxx is a number between 10 and 256.)
  125. r is the maximum line length.  The default is 80.  the r parameter
  126. sets the point at which PRIN will wrap.  I wrap at the last space
  127. before that.  I back up half the line length looking for a space
  128. before I give up and call a procedure called "dumbwrap" that cuts the
  129. "word" at the edge of the print area.  Since
  130. "antidisestablishmentarianism" is well under 40 characters, you will
  131. probably not see "dumbwrap" at work unless you try to print out some
  132. graphics boxes and use too narrow a margin.  The default wrap point is
  133. the last space before 80 characters. This option is not a substitute
  134. for a word processor.  It wraps those lines that do not fit, but
  135. starts the next line at the beginning.  It is intended primarily to
  136. protect the occasional long line in program source code from being
  137. chopped off on printing, or printing off the edge of the paper.
  138.  
  139. INITIALIZATION OFF: i
  140. ---------------------
  141. You may want to use a batch file that sends a file to the printer with
  142. copy or some program to set your printer to near letter quality or
  143. whatever.  If you do, this option prevents PRIN from sending the reset
  144. and wiping out what is in the printer's memory.  This means PRIN will
  145. use whatever font, top of form, etc. the printer is currently set to.
  146.  
  147. DOUBLESPACE: d
  148. --------------
  149. Prints blank lines between the lines in the original file.  Handy for
  150. creating a scratch copy of a file without changing the file itself,
  151. especially if you're writing the file with an editor that does not do
  152. doublespace.
  153.  
  154. PRINT TO FILE: f
  155. ----------------
  156. Prints the output to a file.  This file may be printed later with the
  157. copy command.  This lets you use prin to generate such things as
  158. shareware doc files on discs with embedded formfeeds and page numbers.
  159. Normally you would not use prin to print this output file, because
  160. prin would just filter the formfeeds back out again.  Prin outputs a
  161. line at a time, which is reasonable for a printer, but not very
  162. efficient for writing to files.  Large documents are best handled by
  163. writing to a ram disc and then copying.
  164.  
  165. SET TABSIZE: b
  166. --------------
  167. Sets the tabsize to a single nonzero digit, 1 to 9.
  168.  
  169. for example:
  170.  
  171.         PRIN filename b5
  172.  
  173. would cause prin to space over to the next column that is a multiple of 5
  174. each time a tab is encontered.  Default is 8, which is the same as DOS print
  175. uses.
  176.  
  177.  
  178. CAPITAL LETTER OPTIONS:
  179. -----------------------
  180.  
  181. CLONE: C
  182. --------
  183. Clones the program to the current settings.  The file to be cloned must
  184. be named prin.com, and it must be in the current directory.  Once
  185. cloned, the program may be named anything you wish provided you keep
  186. the extension .com.  This may be useful for creating one copy that prints
  187. doublespace, one that prints with no filename, etc, so you can avoid typing
  188. any parameters at all.
  189.  
  190. KLONE: K
  191. --------
  192. Klones the program to the defaults.  the file to be cloned must be
  193. named prin.com, must be in the current directory.  You must give a
  194. filename, but if you do not want to print something with the current
  195. settings, the file you name should be nonexistant.  Klone will take
  196. effect, and then prin will try to open the nonexistant file to print
  197. out, and exit with the file not found error message.  Klone affects the
  198. file on disc, not what is in memory.
  199.  
  200. EXAMPLE:
  201. --------
  202.         prin nonesuch K
  203.  
  204. This would Klone the program to the defaults, and then look for
  205. nonesuch to be printed with the existing settings.  Since nonesuch does
  206. not exist, nothing will be printed with the settings in memory (the
  207. old ones), and prin will exit, having changed the program on disc to
  208. the default settings.  The next time PRIN is called, the default settings
  209. will be in effect.
  210.  
  211. EXAMPLES
  212. ========
  213.  
  214.         prin prin25.doc
  215.  
  216. This would print PRIN25.DOC at 60 lines per page, with the filename at
  217. the top of the first page.
  218.  
  219.          prin prin25.doc l58 n m p
  220.  
  221. This will print PRIN25.DOC at 58 lines per page *without* the filename
  222. at the top, and add a margin of five spaces at the left, number the
  223. pages.
  224.  
  225.  
  226. PRIN is written in ASSEMBLER, so it is very small and fast.  I have run
  227. {COMMO} in one window of Desqview and PRIN in another with no
  228. noticable slowing of print speed on an 8mhz XT.  PRIN and PRINS.BAT
  229. can run in a 7k window under Desqview.  You will find PRIN works much
  230. better than the DOS print in this situation, because it uses much less
  231. CPU time.Also, PRIN is NOT memory resident.
  232.  
  233.  
  234. ERROR CODES
  235. ===========
  236. On errors, I save the DOS error code and return it on termination, so
  237. you can find out what went wrong if you want.  On successful termination,
  238. I return an errcode of zero.  My own errcodes start at 96. (60h). Have
  239. fun, batch freaks!
  240.  
  241.  
  242. I NEED TESTERS!
  243. ===============
  244. If you print things PRIN is good for, I would like to have you run the
  245. latest versions of the program.
  246.  
  247. The best way to leave me a message about the program would be on:
  248.  
  249.      Gravesend                 (707) 795 4939
  250.      Directory Assistance      (707) 538-8710
  251.      CC&C                      (707) 584 3441
  252.      VOR                       (707) 778 8944
  253.      Motherboard               (707) 778 8743
  254.  
  255. REGISTRATION: Now here is my favorite part: If you use prin, and it
  256. works for you, the right thing to do is to pay for it.  Please send a
  257. self addressed stamped envelope and $5 to the address below.  The
  258. envelope will be used to send you a password and instructions for
  259. converting PRIN to the registered version.
  260.  
  261. PRICING: Prin is priced considerably lower than most comparable
  262. programs.  This reflects a view of shareware that it should be less
  263. expensive than commercial software even when it's better.  If users
  264. enthusiastically upload it, and encourage others to register, I think
  265. I will eventually be paid reasonably for the work I have done.
  266.  
  267.  
  268. Drake Koefoed                    After Sept '90 I will be at
  269. 8120 Tarwater road                 1409 Oakpatch road # A9
  270. Santa Rosa, CA 95404                Eugene Oregon 97402
  271.  
  272.  
  273. LAURELS AND LEGALESE
  274. ====================
  275. Desqview is the property of Quarterdeck. It's a great program.
  276. {Commo} is the property of Fred Brucker.  It's a greater program.
  277.